package com.xiaotao.entity;

import com.xiaotao.service.WebSocketService;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.concurrent.ConcurrentHashMap;

@NoArgsConstructor
@Data
@AllArgsConstructor
@ToString
public class Room {
    private String roomId;//房间ID
    private String ownerId;//房主ID
    private Integer maxUsers;//最大人数
    private ConcurrentHashMap<String, WebSocketService> userMap = new ConcurrentHashMap<>();//房间内用户
    public Room(String roomId, String ownerId, Integer maxUsers){
        this.roomId = roomId;
        this.ownerId = ownerId;
        this.maxUsers = maxUsers;
    }
}
